package com.piece.file.model;

import com.piece.core.framework.support.model.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.*;
import java.io.Serializable;

@Data
@Entity
@NoArgsConstructor
@Table(name = "tb_file_client")
@ApiModel(value = "文件客户端配置表: tb_file_client")
public class TbFileClient extends BaseEntity implements Serializable {

    @Id
    @Column(name = "client_id", length = 64)
    @ApiModelProperty(value = "主键")
    private String clientId;

    @Column(name = "client_type", length = 16)
    @ApiModelProperty(value = "客户端类别", notes = "native、ftp、sftp、mongo、s3")
    private String clientType;

    @Column(name = "is_primary", length = 1)
    @ApiModelProperty(value = "是否默认客户端")
    private String isPrimary;

    @Column(name = "base_path", length = 128)
    @ApiModelProperty(value = "基础路径")
    private String basePath;

    @Column(name = "domain", length = 512)
    @ApiModelProperty(value = "主机地址")
    private String domain;

    @Column(name = "port")
    @ApiModelProperty(value = "主机端口")
    private String port;

    @Column(name = "endpoint", length = 128)
    @ApiModelProperty(value = "endpoint")
    private String endpoint;

    @Column(name = "bucket", length = 128)
    @ApiModelProperty(value = "存储Bucket")
    private String bucket;

    @Column(name = "access_key", length = 128)
    @ApiModelProperty(value = "账号")
    private String accessKey;

    @Column(name = "access_secret", length = 128)
    @ApiModelProperty(value = "密码")
    private String accessSecret;
}
